var toast = new Toast();
var errorsrc = 'http://test-emoker.oss-cn-shenzhen.aliyuncs.com/demo/ako.jpg?Expires=1544176865&OSSAccessKeyId=TMP.AQGdHJsy5qm_Iube59ktkmVD3cLAYShffkHnRa1-aHxpDyyPnT6PvVBV0QkmADAtAhUA3_n_rc_KWQpfvvmliDgFE2o9Mt8CFC_vtJuB84McTIh61knzQ15-uJCN&Signature=wzI4ZBJ9nwZX5E0%2FzH4x4zFm2SU%3D';
var bigsrc = "http://test-emoker.oss-cn-shenzhen.aliyuncs.com/demo/wnmp_for_demo.jpg?Expires=1544176590&OSSAccessKeyId=TMP.AQGdHJsy5qm_Iube59ktkmVD3cLAYShffkHnRa1-aHxpDyyPnT6PvVBV0QkmADAtAhUA3_n_rc_KWQpfvvmliDgFE2o9Mt8CFC_vtJuB84McTIh61knzQ15-uJCN&Signature=ti7PL%2BVltJegSn2dbL%2FQgwKSCaw%3D";
var smallsrc = 'http://test-emoker.oss-cn-shenzhen.aliyuncs.com/demo/wnmp_for_demo.jpg?x-oss-process=style/preload_for_pics&Expires=1544176741&OSSAccessKeyId=TMP.AQGdHJsy5qm_Iube59ktkmVD3cLAYShffkHnRa1-aHxpDyyPnT6PvVBV0QkmADAtAhUA3_n_rc_KWQpfvvmliDgFE2o9Mt8CFC_vtJuB84McTIh61knzQ15-uJCN&Signature=IDhQwSIfVXcB0t0GkqpbgF4rImU%3D';
$(function () {
// new Image().src = errorsrc;
  // $('#demoimg').onload(function () {
  //   toast.show();
  // });
  
});
function imgload(e) {
  if (e.src == bigsrc || e.src == errorsrc) {
    return;
  }
  toast.show('load over');
  var img = new Image();
  img.src = bigsrc;
  img.onload = function () {
    setTimeout(function () {
      e.src = bigsrc;
    }, 1000);
  }

}
function imgerror(e) {
  if (e.src == errorsrc) {
    return;
  }
  toast.show('load error');
  var img = new Image();
  img.src = errorsrc;
  img.onload = function () {
    e.src = errorsrc;
  }

}
